package com.permission.exception;

import com.permission.constant.ResultEnum;
import lombok.Getter;

/**
 * Created by Administrator on 2018/4/2
 */
@Getter
public class SysException extends RuntimeException {

    private Integer code;

    public SysException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public SysException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
